<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type="text/javascript">
        var d = new Date();  
        var Year = d.getFullYear();       
        var Month = d.getMonth()+1;      
        var Date = d.getDate();            
        var Week = d.getDay();            
        var Hours = d.getHours();          
        var Min = d.getMinutes();         
        var Sec = d.getSeconds();         
        var Mil = d.getMilliseconds();     //获取毫秒数0-999
        var fulltime = d.toLocaleString();     
        if(Week==0) Week = "星期日";
        if(Week==1) Week = "星期一";
        if(Week==2) Week = "星期二";
        if(Week==3) Week = "星期三";
        if(Week==4) Week = "星期四";
        if(Week==5) Week = "星期五";
        if(Week==6) Week = "星期六";
        document.write('当前时间是：'+Year+'年'+Month+'月'+Date+'日'+Week+Hours+'：'+Min+'：'+Sec+"<br>");
        document.write('当前时间是：'+fulltime);
 </script>
 
</body>
</html>